/** 
 * File-Name:WebPageSaver.java
 *
 * Created on 2010-11-20 下午07:20:05
 * 
 * @author: Neo (neolimeng@gmail.com)
 * Software Engineering Institute, Peking University, China
 * 
 * Copyright (c) 2009, Peking University
 * 
 *
 */
package org.neocrawler.storage;

import java.io.File;

import org.apache.commons.io.FileUtils;
import org.apache.log4j.Logger;

/**
 * Description:
 * 
 * @author: Neo (neolimeng@gmail.com) Software Engineering Institute, Peking
 *          University, China
 * @version 1.0 2010-11-20 下午07:20:05
 */
public class WebPageSaver {
	private static Logger log = Logger.getLogger(WebPageSaver.class);

	public static synchronized void saveWebPage(String path, String fileName, String content)
			throws Exception {
		log.info("将名为“" + fileName + "”的文件保存到" + path + fileName);
		FileUtils.writeStringToFile(new File(path + fileName), content);
	}

	/**
	 * Description:
	 * 
	 * @author: Neo (neolimeng@gmail.com) Software Engineering Institute, Peking
	 *          University, China
	 * @version 1.0 2010-11-20 下午07:20:05
	 * @param args
	 *            void
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
